package day2;

class Shapes {

    public void draw() {
        System.out.println("画图");
    }
}

class Cycle extends Shapes{
    @Override
    public void draw() {
        System.out.println("●");
    }
}

class Rect extends Shapes{
    @Override
    public void draw() {
        System.out.println("◇");
    }
}

class Flower extends Shapes{
    @Override
    public void draw() {
        System.out.println("❀");
    }
}

public class Test7 {

    public static void main(String[] args) {
        Shapes shape = new Rect();
        Cycle cycle = new Cycle();
        Flower flower = new Flower();

//        Shapes[] shapes = {cycle,rect,flower};
//        for (Shapes shape : shapes) {
//            shape.draw();
//        }
        shape.draw();
    }

}